#ifndef CONTROL_THREAD_H
#define CONTROL_THREAD_H

#include <unistd.h>
#include <vector>

#include <QString>
#include <QThread>
#include <QCoreApplication>
//#include <QtSerialPort/QSerialPort>
//#include <QtSerialPort/QSerialPortInfo>
#include <QDebug>

class MyControlThread : public QThread
{
    Q_OBJECT

public:
    MyControlThread(QString device);
    void stop();

private:
    QString dev;
    //QSerialPort* serial;
    bool stop_flag;

protected:
    void run() override;

signals:
    void update_sbus_frame(std::vector<uint16_t> ch);
//    void update_sbus_state(int val);
    void update_controler_log(QString log);
};


#endif // CONTROL_THREAD_H
